"use strict";

function mapFn(e) {
  var t = localStorage.getItem("lat") || "39.984120",
      a = localStorage.getItem("lng") || "116.307484",
      t = new TMap.LatLng(t, a),
      o = (document.querySelector(".map").innerText = "", new TMap.Map(document.querySelector(".map"), { center: t, zoom: 10, pitch: 43.5, rotation: 45 }));new TMap.MultiMarker({ id: "marker-layer", map: o, styles: { marker: new TMap.MarkerStyle({ width: 25, height: 35, anchor: { x: 16, y: 32 }, src: "https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerDefault.png" }) }, geometries: e.map(function (e, t) {
      return { id: "demo", styleId: "marker", position: new TMap.LatLng(e.lat, e.lng), properties: { title: "marker" } };
    }) }).setStyles({ marker: new TMap.MarkerStyle({ width: 35, height: 35, src: "https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerNew.png", opacity: .8 }) }), new TMap.InfoWindow({ map: o, position: t, content: "你好，中国！~！" }), window.onscroll = function () {
    var r = document.documentElement.scrollTop || document.body.scrollTop,
        e = document.querySelectorAll(".list-ul>li");e.forEach(function (e, t) {
      var a = e.offsetTop;r >= a && r < a + 153 && (a = $(e).attr("lat"), e = $(e).attr("lng"), o.setCenter(new TMap.LatLng(a, e)), o.setZoom(18));
    });
  };
}